/*
 * @Author: 0x9DEFA478
 * @Date: 2021-11-17 23:30:16
 * @LastEditTime: 2022-01-08 17:34:57
 * @LastEditors: 0x9DEFA478
 * @Description: 
 * QQ:2652450237
 * ============================================================================================================================================
 * 
 * 
 * 
 *                                                                                               ************      ****************************
 *                                                                                             ************      ****************************  
 *                                                                                           ************      ****************************    
 *                                                                                         ************      ****************************      
 *                                                                                       ************      ************                        
 *                                                                                     ************      ************                          
 *                                                                                   ************      ************                            
 *                                                                                 ************      ************                              
 *                                                                               ************      ************                                
 *                                                                             ************      ************                                  
 *                                                                           ************      ************                                    
 *                                                                         ************      ************                                      
 *                                                                       ************      ************                                        
 *                                                                     ************      ************                                          
 *                                                                   ************      ************                                            
 *                                                                 ************      ************                                              
 *                                                               ************      ************                                                
 *                                                             ************      ************                                                  
 *                                                           ************      ************                                                    
 *                                                         ************      ************                                                      
 *                                                       ************      ************                                                        
 *                                                     ************      ************                                                          
 *                                                   ************      ************                                                            
 *                                                 ************      ************                                                              
 *                                               ************      ************                                                                
 *                                             ************      ************                                                                  
 *                                           ************      ************                                                                    
 *                                         ************      ************                                                                      
 *                                       ************      ************                                                                        
 *                                     ************      ************                                                                          
 *                                   ************      ************                                                                            
 *                                 ************      ************                                                                              
 *                               ************      ************                                                                                
 *                             ************      ************                                                                                  
 *                           ************      ************                                                                                    
 *                         ************      ************                                                                                      
 *       ****************************      ************                                                                                        
 *     ****************************      ************                                                                                          
 *   ****************************      ************                                                                                            
 * ****************************      ************                                                                                              
 * 
 * 
 * 
 * ============================================================================================================================================
 * 
 */
#ifndef __System_System_H_
#define __System_System_H_
#include "H_Type.h"
#include "stm32h7xx.h"


//编译顺序屏蔽 使得编译出的代码在System_Barrier()前后是不交叉的
#define System_CompileBarrier()                                     __schedule_barrier()


extern volatile Hsize TimeTick;
#define System_Time_ms_Type Hsize

//获取系统时间
#define System_GetTime_ms() (TimeTick)

//数据内存屏障 自带编译顺序屏蔽
#define System_DataMemoryBarrier()                                  __DMB()

//数据同步屏障 自带编译顺序屏蔽
#define System_DataSynchronizationBarrier()                         __DSB()

//指令同步屏障 自带编译顺序屏蔽
#define System_InstructionSynchronizationBarrier()                  __ISB()

#endif //__System_System_H_
